package com.zy.ems.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.zy.ems.mapper.MemberMapper;
import com.zy.ems.model.MemberEntity;

import com.zy.ems.common.base.BaseDao;

@Repository
public class MemberDao extends BaseDao<MemberEntity, Integer> {

	@Autowired
	private MemberMapper memberMapper;

	/**
	 * find member by userName;
	 * 
	 * @param userName
	 * @return
	 */
	public MemberEntity findMemberByUserName(String userName) {
		return this.memberMapper.findMemberByUserName(userName);
	}

	@Override
	@SuppressWarnings("unchecked")
	public MemberMapper getMapper() {
		return this.memberMapper;
	}

	@Override
	protected String getNamespace() {
		return MemberMapper.class.getName();
	}

}
